<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\Api\V1;

use Think\Exception;
use Think\Upload\Driver\Qiniu;

class TestUpload
{
    public $login = false; //是否需要登录才能访问该接口
    public $title = "七牛上传";
    public $group = '上传';
    public $desc = "";

    public $input = [

    ];

    public $output = [
    ];


    public function run($param, $uid, $login_info)
    {

        $Qiniu = new Qiniu();
        $file = $_FILES['file1'];
        $file['savepath'] = '/image/';
        $file['savename'] = time().'-'.rand(10000,99999);

        $flag = $Qiniu->save($file, false);
        var_dump($file);exit();
    }

}